import rxAjax from '@/assets/js/ajax.js';
export const SysWaterMarkApi = {};

SysWaterMarkApi.baseUrl= '/api-system/system/core/sysWaterMart';

SysWaterMarkApi.query=function (parameter) {
  var url= SysWaterMarkApi.baseUrl + '/query';
  return rxAjax.postJson(url,parameter).then (res => {
    return res.result
  })
}

/**
 * 获取单记录
 * @param pkId
 * @returns {*}
 */
SysWaterMarkApi.get =function(pkId) {
  var url= SysWaterMarkApi.baseUrl + '/get?pkId=' + pkId;
  return rxAjax.get(url);
}

SysWaterMarkApi.save =function(parameter) {
  var url= SysWaterMarkApi.baseUrl + '/save';
  return rxAjax.postJson(url,parameter);
}

SysWaterMarkApi.del =function(parameter) {
  var url= SysWaterMarkApi.baseUrl + '/delById';
  return rxAjax.postUrl(url,parameter);
}

/**
 * 获取水印配置信息
 * @param pkId
 * @returns {*}
 */
SysWaterMarkApi.getWaterMarkConfig =function() {
    var url= SysWaterMarkApi.baseUrl + '/getWaterMarkConfig';
    return rxAjax.get(url);
}

export  default SysWaterMarkApi;
